#import <Cocoa/Cocoa.h>

typedef enum {
    kDirection_NorthSouth,
    kDirection_EastWest
} BWQueenStitch_Direction;

#define BWQueenStitchInvertDirection(direction) \
    ((direction == kDirection_NorthSouth)       \
     ? kDirection_EastWest : kDirection_NorthSouth)

@interface BWQueenStitch : NSObject <NSCoding>
{
    int x;
    int y;
    NSColor *color1; // map to a thread eventually
    NSColor *color2; 
    BWQueenStitch_Direction direction;
}

+ (BWQueenStitch *) newStitchAtX: (int) x
                               y: (int) y
                          color1: (NSColor *) color
                          color2: (NSColor *) color // can be nil
                       direction: (BWQueenStitch_Direction) direction;

- (int) x;
- (int) y;

- (NSColor *) color1;
- (NSColor *) color2;
- (BWQueenStitch_Direction) direction;

- (void) setX: (int) newX;
- (void) setY: (int) newY;
- (void) setColor1: (NSColor *) color;
- (void) setColor2: (NSColor *) color;
- (void) setDirection: (BWQueenStitch_Direction) direction;

@end // BWQueenStitch

